<?php
$CI 			= & get_instance();
$CI->load->library(array('session'));

$id_usuario 	= 	$CI->session->userdata('id');

$nome_usuario 	= 	$CI->session->userdata('nome');

// --- Marcando o item tivo do menu ---//

$area = $this->uri->segment(1);

$menu_home = '';
$menu_usuario = '';
$menu_noticia = '';

switch ($area){

	case 'home':
		$menu_home =  'active';
		break;

	case 'usuario':
		$menu_usuario =  'active';
		break;

	case 'noticia':
		$menu_noticia =  'active';
		break;

}

// --- Fim ---//


?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="content-language" content="pt-br" />
    <meta http-equiv="refresh" content="<?php echo $CI->config->item('sess_expiration');?>" />
    <meta name="description" content="GN Seguro, Sua corretora de seguros">
    <meta name="abstract" content="GN Seguro, Sua corretora de seguros">
    <meta name="author" content="Site Invocado">
	<meta name="reply-to" content="siteinvocado@gmail.com">
	<meta name="revised" content="28/12/2014" />
	<meta name="keywords" content="GN Seguro, Sua corretora de seguros, site invocado, seguro, corretora, corretor, gnseguro, siteinvocado">
	<meta name="ROBOT" content="Index,Follow">

    <title>GN Seguro - Administração do Site</title>

    <!-- Bootstrap Core CSS -->
    <link href="<?php echo base_url();?>css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="<?php echo base_url();?>css/plugins/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="<?php echo base_url();?>css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="<?php echo base_url();?>font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    
    
    <!-- Jquery UI  -->
    <link href="<?php echo base_url();?>js/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css">
    
    
    

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    
    <!-- jQuery -->
    <script src="<?php echo base_url();?>js/jquery.js"></script>
    <script src="<?php echo base_url();?>js/plugins/jquery-ui/jquery-ui.min.js"></script>
    <script src="<?php echo base_url();?>js/plugins/jquery-ui/datepicker-pt-BR.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="<?php echo base_url();?>js/plugins/metisMenu/metisMenu.min.js"></script>
    
    <!-- DataTables JavaScript -->
    <script src="<?php echo base_url();?>js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="<?php echo base_url();?>js/plugins/dataTables/dataTables.bootstrap.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="<?php echo base_url();?>js/sb-admin-2.js"></script>
    
    <!-- CKEditor -->
    <script src="<?php echo base_url();?>js/plugins/ckeditor/ckeditor.js"></script>

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="<?php echo site_url('home'); ?>">GN Seguros - Administração do Site</a>
            </div>
            <!-- /.navbar-header -->

            <ul class="nav navbar-top-links navbar-right">

                 <li class="dropdown">
                    <a class="dropdown-toggle" href="<?php echo site_url('usuario/update/'.$id_usuario); ?>">
                        <i class="fa fa-user fa-fw"></i> Perfil de <?php echo $nome_usuario; ?>
                    </a> 
                </li>
                
                <li class="dropdown">
                    <a class="dropdown-toggle" href="<?php echo site_url('login/logoff'); ?>">
                        <i class="fa fa-sign-out fa-fw"></i> Sair
                    </a> 
                </li>
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->

            <div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        
                        <li>
                            <a href="<?php echo site_url('home'); ?>" class="<?php echo $menu_home;?>" ><i class="fa fa-home fa-lg"></i> Home </a>
                        </li>

                        <li>
                            <a href="<?php echo site_url('noticia'); ?>" class="<?php echo $menu_noticia;?>"><i class="fa fa-pencil fa-lg"></i> Notícias </a>
                        </li>
                        
                        <li>
                            <a href="<?php echo site_url('usuario'); ?>" class="<?php echo $menu_usuario;?>"><i class="fa fa-users fa-lg"></i> Usuários </a>
                        </li>
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header"><?php echo $titulo;?></h1>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                
                <div clas="row">
                		 {TPL_content}
                </div>
                
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- /#page-wrapper -->
        
        
    </div>
    <!-- /#wrapper -->

    <!-- Bootstrap Core JavaScript -->
    <script src="<?php echo base_url();?>js/bootstrap.min.js"></script>
    
    {TPL_js_custom}

</body>

</html>